<style>
    body{
        font-size: 12px;
    }
    .bag{
        color: #fff;
        width: 4px;
        text-align: center;
    }
    .bag-1{
        background-color: #e74c3c;
    }
    .bag-2{
        background-color: #3498db;
    }
    .bag-3{
        background-color: #f39c12;
    }
    .bag-4{
        background-color: #18bc9c;
    }
    .bag-5{
        background-color: #605ca8;
    }
    .bag-6{
        background-color: #e74c3c;
    }
    .bag-7{
        background-color: #3498db;
    }
    .bag-8{
        background-color: #f39c12;
    }
    .bag-9{
        background-color: #18bc9c;
    }
    .bag-0{
        background-color: #605ca8;
    }
    .color-gray{
        color: #999999;
    }
    .margin-left{
        margin-left: 20px;
    }
    .padding{
        padding: 5px;
    }
</style>
<div class="panel panel-default panel-intro">
    <div class="panel-body">

        <div class="alert alert-default-light">

            <fieldset>
                <legend>
                    <h4>订单信息</h4>

                </legend>
                <table  class="table table-striped table-bordered table-hover table-nowrap">
                    <tbody>
                    <tr style="background-color: #fff ">
                        <!--<td rowspan="3" class="bag bag-1" style="text-align: center; vertical-align: middle;">
                            <div>包</div>
                            <div>裹</div>
                            <div class="text-center">1</div>
                        </td>-->
                        <td style=" vertical-align: middle;">
<!--                            <span class="margin-left">-->
<!--                            物流状态:-->
<!--                            <span class="label bag-{$row.state}">{$row.state_text}</span>-->

                        </span>
                            <span class="margin-left">
                            订单状态:
                            <span class="label bag-{$row.state}">{$row.status_text}</span>

                        </span>
<!--                            {if $row.express_no}-->
<!--                            <span class="margin-left">-->
<!--                            <button class="btn btn-xs btn-warning btn-invoice" data-id="{$row.id}">打印出库单</button>-->
<!--                        </span>-->

<!--                            <span class="margin-left">-->
<!--                            <button class="btn btn-xs btn-primary btn-track" data-id="{$row.id}">查看物流轨迹</button>-->
<!--                        </span>-->
<!--                            {/if}-->

                        </td>
                    </tr>
                    <tr>
                        <td style="padding: 0">
                            <table class="table table-striped table-bordered table-hover table-nowrap" style="margin-bottom: 0px">
                                <thead>
                                <tr style="background-color: #F2F2F2">
                                    <th style="text-align: center; vertical-align: middle;">
                                        <div class="th-inner">编号</div>
                                    </th>
                                    <th style="text-align: center; vertical-align: middle;">
                                        <div class="th-inner">商品</div>
                                    </th>
                                    <th style="text-align: center; vertical-align: middle;">
                                        <div class="th-inner">分类</div>
                                    </th>



                                    <th style="text-align: center; vertical-align: middle;">
                                        <div class="th-inner">数量</div>
                                    </th>
                                    <th style="text-align: center; vertical-align: middle;">
                                        <div class="th-inner">价格</div>
                                    </th>

                                </tr>
                                </thead>
                                <tbody>
                                {if $row.goods}
                                {volist name="row.goods" id="goods"}
                                <tr>
                                    <td style="text-align: center; vertical-align: middle;">{$key+1}</td>
                                    <td style="text-align: center; vertical-align: middle;">
                                        <strong>{$goods.name}</strong>
                                    </td>
                                    <td style="text-align: center; vertical-align: middle;">{$goods.category.name}</td>
                                    <td style="text-align: center; vertical-align: middle;">{$goods.number}</td>
                                    <td style="text-align: center; vertical-align: middle;">{$goods.price}</td>
                                </tr>
                                {/volist}
                                {else/}
                                <tr>
                                    <td colspan="7"  style="text-align: center; vertical-align: middle;"> 暂无添加订单商品</td>

                                </tr>

                                {/if}

                                </tbody>
                            </table>
                        </td>
                    </tr>

                    <tr style="background-color: #fff">
                        <td style=" vertical-align: middle;">
                            地址信息:
                            <span class="color-gray">
                            {if $row.address}
                            {$row.address.province}{$row.address.city}{$row.address.area}{$row.address.address}
                            {else/}
                            暂无添加
                            {/if}

                        </span>
                            手机号:
                            <span class="color-gray">
                            {$row.address.mobile ?? '暂无添加' }
                        </span>

                        </td>


                    </tr>
                    </tbody>
                </table>
<!--                <div class="col-sm-6 padding">-->
<!--                    订单总重量:{$row.delivery_weight}KG-->
<!--                </div>-->
<!--                <div class="col-sm-6 padding">-->
<!--                    订单邮费:{$row.delivery_price}-->
<!--                </div>-->
<!--                <div class="col-sm-6 padding">-->
<!--                    是否拆箱:{$row.is_open_text}-->
<!--                </div>-->
<!--                <div class="col-sm-6 padding">-->
<!--                    是否发货:{$row.is_delivery_text}-->
<!--                </div>-->
                <div class="col-sm-6 padding">
                    订单状态:{$row.status_text}
                </div>
                <div class="col-sm-6 padding">
                    订单备注:{$row.remark}
                </div>
            </fieldset>

            <div class="alert alert-success-light" style="min-height: 40px">
                {if $row.service}
                {volist name="row.service" id="service"}
                <div class="col-sm-6">
                    <i class="fa fa-check fa-fw"></i>{$service.name}   {$service.price}/单
                </div>
                {/volist}
                {else/}
                无增值服务
                {/if}
            </div>
        </div>

        {if $row.status == 'complete'}
        <form id="edit-form" class="form-horizontal " role="form" data-toggle="validator" method="POST" action="">

            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Delivery_weight')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <div class="input-group">
                        <input id="c-delivery_weight" class="form-control" data-rule="range(0.01~)" step="0.01" name="row[delivery_weight]" type="number" value="{$row.delivery_weight}">
                        <span class="input-group-addon">Kg</span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="control-label col-xs-12 col-sm-2">{:__('Delivery_price')}:</label>
                <div class="col-xs-12 col-sm-8">
                    <input id="c-delivery_price" class="form-control" step="0.01" data-rule="range(0.01~)" name="row[delivery_price]" type="number" value="{$row.delivery_price}">
                </div>
            </div>
            <input type="hidden" name="row[status]" value="waitingpay">
            <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('发起用户支付')}</button>
                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                </div>
            </div>
        </form>
        {/if}

        {if $row.status == 'successpay'}
        <form id="edit-form" class="form-horizontal " role="form" data-toggle="validator" method="POST" action="">

            <!-- <div class="form-group">
                 <label class="control-label col-xs-12 col-sm-2">{:__('物流单号')}:</label>
                 <div class="col-xs-12 col-sm-8">
                     <input id="c-express_no" class="form-control" name="row[express_no]" type="text" value="{$row.express_no}">
                 </div>
             </div>
             <div class="form-group">
                 <label class="control-label col-xs-12 col-sm-2">{:__('物流公司')}:</label>
                 <div class="col-xs-12 col-sm-8">
                     <input id="c-express_name" class="form-control" name="row[express_name]" type="text" value="{$row.express_name}">
                 </div>
             </div>-->
            <input type="hidden" name="row[status]" value="delivered">
            <div class="form-group layer-footer">
                <label class="control-label col-xs-12 col-sm-2"></label>
                <div class="col-xs-12 col-sm-8">
                    <button type="submit" class="btn btn-success btn-embossed disabled">{:__('确认发货')}</button>
                    <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                </div>
            </div>
        </form>
        {/if}
    </div>
</div>

